home *** CD-ROM | disk | FTP | other *** search
-
-
-
- ggggeeeetttteeeebbbbllllkkkk((((DDDD3333)))) ggggeeeetttteeeebbbbllllkkkk((((DDDD3333))))
-
-
-
- NNNNAAAAMMMMEEEE
- _gggg_eeee_tttt_eeee_bbbb_llll_kkkk - get an empty buffer
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_tttt_yyyy_pppp_eeee_ssss_...._hhhh_>>>>
- _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_bbbb_uuuu_ffff_...._hhhh_>>>>
- _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_dddd_dddd_iiii_...._hhhh_>>>>
- _bbbb_uuuu_ffff______tttt _****_gggg_eeee_tttt_eeee_bbbb_llll_kkkk_((((_vvvv_oooo_iiii_dddd_))))_;;;;
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _gggg_eeee_tttt_eeee_bbbb_llll_kkkk retrieves a buffer [see _bbbb_uuuu_ffff(D4)] from the buffer cache and
- returns a pointer to the buffer header. If a buffer is not available,
- _gggg_eeee_tttt_eeee_bbbb_llll_kkkk sleeps until one is available.
-
- RRRReeeettttuuuurrrrnnnn VVVVaaaalllluuuueeeessss
- A pointer to the buffer header structure is returned.
-
- UUUUSSSSAAAAGGGGEEEE
- When the driver _ssss_tttt_rrrr_aaaa_tttt_eeee_gggg_yyyy(D2) routine receives a buffer header from the
- kernel, all the necessary members are already initialized. However, when
- a driver allocates buffers for its own use, it must set up some of the
- members before calling its _ssss_tttt_rrrr_aaaa_tttt_eeee_gggg_yyyy routine.
-
- The following list describes the state of these members when the buffer
- header is received from _gggg_eeee_tttt_eeee_bbbb_llll_kkkk:
-
- _bbbb______ffff_llll_aaaa_gggg_ssss is set to indicate the transfer is from the user's
- buffer to the kernel. The driver must set the _BBBB______RRRR_EEEE_AAAA_DDDD
- flag if the transfer is from the kernel to the user's
- buffer.
-
- _bbbb______eeee_dddd_eeee_vvvv is set to _NNNN_OOOO_DDDD_EEEE_VVVV and must be initialized by the driver.
-
- _bbbb______bbbb_cccc_oooo_uuuu_nnnn_tttt is set to 1024.
-
- _bbbb______uuuu_nnnn_...._bbbb______aaaa_dddd_dddd_rrrr is set to the buffer's virtual address.
-
- _bbbb______bbbb_llll_kkkk_nnnn_oooo is not initialized by _gggg_eeee_tttt_eeee_bbbb_llll_kkkk, and must be initialized
- by the driver
-
- Typically, block drivers do not allocate buffers. The buffer is
- allocated by the kernel, and the associated buffer header is used as an
- argument to the driver _ssss_tttt_rrrr_aaaa_tttt_eeee_gggg_yyyy routine. However, to implement some
- special features, such as _iiii_oooo_cccc_tttt_llll(D2) commands that perform I/O, the driver
- may need its own buffer space. The driver can get the buffer space from
- the system by using _gggg_eeee_tttt_eeee_bbbb_llll_kkkk or _nnnn_gggg_eeee_tttt_eeee_bbbb_llll_kkkk(D3). If the driver chooses to
- use its own memory for the buffer, it can allocate a buffer header only
- using _gggg_eeee_tttt_rrrr_bbbb_uuuu_ffff(D3).
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- ggggeeeetttteeeebbbbllllkkkk((((DDDD3333)))) ggggeeeetttteeeebbbbllllkkkk((((DDDD3333))))
-
-
-
- Buffers allocated via _gggg_eeee_tttt_eeee_bbbb_llll_kkkk must be freed using either _bbbb_rrrr_eeee_llll_ssss_eeee(D3) or
- _bbbb_iiii_oooo_dddd_oooo_nnnn_eeee(D3).
-
- LLLLeeeevvvveeeellll
- Base only.
-
- SSSSyyyynnnncccchhhhrrrroooonnnniiiizzzzaaaattttiiiioooonnnn CCCCoooonnnnssssttttrrrraaaaiiiinnnnttttssss
- Can sleep.
-
- Driver-defined basic locks and read/write locks may not be held across
- calls to this function.
-
- Driver-defined sleep locks may be held across calls to this function.
-
- RRRREEEEFFFFEEEERRRREEEENNNNCCCCEEEESSSS
- _bbbb_iiii_oooo_dddd_oooo_nnnn_eeee(D3), _bbbb_iiii_oooo_wwww_aaaa_iiii_tttt(D3), _bbbb_rrrr_eeee_llll_ssss_eeee(D3), _bbbb_uuuu_ffff(D4), _nnnn_gggg_eeee_tttt_eeee_bbbb_llll_kkkk(D3)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-